-
Notifications
You must be signed in to change notification settings - Fork 224
Improved performance of iterator of Utf8Array
and BinaryArray
(3-4x)
#427
Conversation
Utf8Array
and BinaryArray
(3-4x)Utf8Array
and BinaryArray
(3-4x)
Codecov Report
@@ Coverage Diff @@
## main #427 +/- ##
=======================================
Coverage 80.78% 80.78%
=======================================
Files 372 372
Lines 22645 22639 -6
=======================================
- Hits 18294 18290 -4
+ Misses 4351 4349 -2
Continue to review full report at Codecov.
|
c76e4c2
to
150b469
Compare
150b469
to
194e17d
Compare
Good catch, @Dandandan , I also rebased incorrectly and removed the |
194e17d
to
bd78970
Compare
Very nice perf. improvement! Could you explain what you did? I've been browsing a bit, but I can't find it yet. Is it this line?
|
bd78970
to
4ea7607
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the main changes, @ritchie46
|
||
let slice = &self.values.as_slice()[offset..offset + length]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line @ritchie46
|
||
&self.values[offset..offset + length] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line @ritchie46
|
||
&self.values[offset..offset + length] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line
let length = (offset_1 - offset).to_usize(); | ||
let offset = offset.to_usize(); | ||
|
||
let slice = &self.values.as_slice()[offset..offset + length]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this
This has implications on almost every kernel over these arrays, as well as users of the iterator.